package newx.com.control.table
{
	public class NxTabelPos
	{
		private var _row	:int;
		
		private var _colum	:int;
		
		public function NxTabelPos(rowVal:int = 0 , columVal:int = 0)
		{
			_row	=	rowVal;
			_colum	=	columVal;
		}
		
		/**
		 * 判断是否相等，当目标对象不为null并且等于当前对象时返回true
		 * @param val
		 * @return 
		 * 
		 */		
		public function equals(val:NxTabelPos):Boolean
		{
			if(val == null)
			{
				return false;
			}
			if(val._colum == this._colum && val._row == this._row)
			{
				return true;
			}
			return false;
		}
		
		/**使行列归零*/
		public function reSet():void
		{
			_row	=	0;
			_colum	=	0;
		}

		/**单元格所在列*/
		public function get colum():int
		{
			return _colum;
		}

		/**
		 * @private
		 */
		public function set colum(value:int):void
		{
			_colum = value;
		}

		/**单元格所在行*/
		public function get row():int
		{
			return _row;
		}

		/**
		 * @private
		 */
		public function set row(value:int):void
		{
			_row = value;
		}

	}
}